package org.apache.http.message;

import org.apache.http.annotation.NotThreadSafe;

@NotThreadSafe
public class j {
    private final int a;
    private final int b;
    private int c;

    public j(int i, int i2) {
        if (i < 0) {
            throw new IndexOutOfBoundsException("Lower bound cannot be negative");
        } else if (i > i2) {
            throw new IndexOutOfBoundsException("Lower bound cannot be greater then upper bound");
        } else {
            this.a = i;
            this.b = i2;
            this.c = i;
        }
    }

    public int a() {
        return this.b;
    }

    public void a(int i) {
        if (i < this.a) {
            throw new IndexOutOfBoundsException("pos: " + i + " < lowerBound: " + this.a);
        } else if (i > this.b) {
            throw new IndexOutOfBoundsException("pos: " + i + " > upperBound: " + this.b);
        } else {
            this.c = i;
        }
    }

    public int b() {
        return this.c;
    }

    public boolean c() {
        return this.c >= this.b;
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append('[');
        stringBuilder.append(Integer.toString(this.a));
        stringBuilder.append('>');
        stringBuilder.append(Integer.toString(this.c));
        stringBuilder.append('>');
        stringBuilder.append(Integer.toString(this.b));
        stringBuilder.append(']');
        return stringBuilder.toString();
    }
}
